import request from "@/utils/http/axios";

class CategoryApi {
    static listAll(){
        return request({
            url: "/category/list",
            method: "get"
        })
    }

    static add(category){
        return request({
            url: "/category/add",
            method: "post",
            data: category
        })
    }

    static update(category){
        return request({
            url: "/category/update",
            method: "post",
            data: category
        })
    }

    static deleteById(id){
        return request({
            url: "/category/delete",
            method: "delete",
            params: {id}
        })
    }
     
}

export default CategoryApi;